package cn.snailhd.util;

import java.io.IOException;
import java.io.*;

public final class IoUtils {
	public static void close(Writer writer){
		try {
			if(writer!=null)
			writer.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static void close(Reader reader){
		try {
			if(reader!=null)
				reader.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static void close(InputStream is){
		try {
			if(is!=null)
				is.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public static void close(OutputStream os){
		try {
			if(os!=null)
				os.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
